import request from '@/utils/request'

// 查询我的工单列表
export function listTicket(query) {
  return request({
    url: '/ticket/ticket/list',
    method: 'get',
    params: query
  })
}

// 查询我的工单详细
export function getTicket(id) {
  return request({
    url: '/ticket/ticket/' + id,
    method: 'get'
  })
}

// 新增我的工单
export function addTicket(data) {
  return request({
    url: '/ticket/ticket',
    method: 'post',
    data: data
  })
}

// 修改我的工单
export function updateTicket(data) {
  return request({
    url: '/ticket/ticket',
    method: 'put',
    data: data
  })
}

// 删除我的工单
export function delTicket(id) {
  return request({
    url: '/ticket/ticket/' + id,
    method: 'delete'
  })
}

//测试
export function test(){
  return request({
    url:'/system/ticket/test',
    method:'get'

  })
}
